
import apiType, {
    GET_WAREHOUSE_REFUND_PROCESS,
    GET_WAREHOUSE_REFUND_INFO
} from "@constants/ActionTypes";

const initialState = {
    refundProcessList:{},       //待处理退货单列表
    warehouseRefundInfo: {},    //退货订单详情
}

export default function update(state = initialState, action) {
    const { response, params, payload } = action
    switch (action.type) {
        case apiType(GET_WAREHOUSE_REFUND_PROCESS).success:
            return {
                ...state,
                refundProcessList: response,
            }
        case apiType(GET_WAREHOUSE_REFUND_INFO).success:
            return {
                ...state,
                warehouseRefundInfo: response,
            }

        default:
            return state
    }
}